Developer Documentation

QuickTime 4 API Documentation

3D Graphics Programming with QuickDraw 3D 1.5.4

Previous | QD3D Book | Overview | Chapter Contents | Next |

Negating Vectors

QuickDraw 3D provides routines that you can use to negate (or reverse) vectors. The result of negating a vector is a vector having the same magnitude but the opposite direction as the original vector.

Q3Vector2D_Negate

You can use the Q3Vector2D_Negate function to negate a two-dimensional vector.

TQ3Vector2D *Q3Vector2D_Negate (
                     const TQ3Vector2D *vector2D,
                     TQ3Vector2D *result);
vector2D
A two-dimensional vector.
result
On exit, the negation of the specified vector.

DESCRIPTION

The Q3Vector2D_Negate function returns, as its function result and in the result parameter, the vector that is the negation of the vector vector2D .

Q3Vector3D_Negate

You can use the Q3Vector3D_Negate function to negate a three-dimensional vector.

TQ3Vector3D *Q3Vector3D_Negate (
                     const TQ3Vector3D *vector3D,
                     TQ3Vector3D *result);
vector3D
A three-dimensional vector.
result
On exit, the negation of the specified vector.

DESCRIPTION

The Q3Vector3D_Negate function returns, as its function result and in the result parameter, the vector that is the negation of the vector vector3D .


© 1997 Apple Computer, Inc.

Previous | QD3D Book | Overview | Chapter Contents | Next |